package com.flurry.android;

import org.json.JSONException;
import org.json.JSONObject;

public class AppCloudResponse
{
  private AppCloudObject bW;
  AppCloudUser bX;
  JSONObject bY;

  public AppCloudResponse(JSONObject paramJSONObject)
  {
    this.bY = paramJSONObject;
  }

  public int getHTTPResponseCode()
  {
    try
    {
      if (this.bY != null)
      {
        int i = this.bY.getInt("code");
        return i;
      }
      return 400;
    }
    catch (JSONException localJSONException)
    {
      localJSONException.printStackTrace();
    }
    return 0;
  }

  public AppCloudObject getObject()
  {
    return this.bW;
  }

  public JSONObject getResponse()
  {
    return this.bY;
  }

  public String getResponseMessage()
  {
    try
    {
      if (this.bY != null)
      {
        String str = this.bY.get("note").toString();
        return str;
      }
    }
    catch (JSONException localJSONException)
    {
      localJSONException.printStackTrace();
    }
    return "";
  }

  public AppCloudUser getUser()
  {
    return this.bX;
  }

  public boolean isSuccessful()
  {
    try
    {
      JSONObject localJSONObject = this.bY;
      boolean bool = false;
      if (localJSONObject != null)
        if (this.bY.getInt("code") != 200)
        {
          int i = this.bY.getInt("code");
          bool = false;
          if (i != 201);
        }
        else
        {
          bool = true;
        }
      return bool;
    }
    catch (JSONException localJSONException)
    {
      localJSONException.printStackTrace();
    }
    return false;
  }

  public void setObject(AppCloudObject paramAppCloudObject)
  {
    this.bW = paramAppCloudObject;
  }

  public void setUser(AppCloudUser paramAppCloudUser)
  {
    this.bX = paramAppCloudUser;
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.flurry.android.AppCloudResponse
 * JD-Core Version:    0.6.2
 */